<template>
	<tm-fullView>
		<template v-slot:default="{info}">
			<view class="grey text " :class="$tm.vx.state().tmVuetify.black?'black bk':''" :style="{minHeight:info.height+'px'}">
				<tm-menubars title="开关" color="bg-gradient-blue-accent" :showback="true"></tm-menubars>
				<tm-sheet  :shadow="24">
					<view class="text-size-s text-weight-b mb-24">基本示例</view>
					<tm-row>
						<tm-col :grid="3"><tm-switch v-model="on"></tm-switch></tm-col>
						<tm-col :grid="3"><tm-switch :text="['嗯','禁']" color="bg-gradient-blue-accent" v-model="on"></tm-switch></tm-col>
						<tm-col :grid="3"><tm-switch :text="['off','on']" color="bg-gradient-orange-accent" v-model="on"></tm-switch></tm-col>
						<tm-col :grid="3"><tm-switch :text="['','']" color="bg-gradient-pink-accent" v-model="on"></tm-switch></tm-col>
					</tm-row>
				</tm-sheet>
				<tm-grouplist :margin="32" :shadow="24">
					<tm-listitem title="设置状态">
						<template v-slot:rightIcon="">
							<tm-switch :text="['','']" color="bg-gradient-orange-accent" v-model="on"></tm-switch>
						</template>
					</tm-listitem>
					<tm-listitem title="我被禁用">
						<template v-slot:rightIcon="">
							<tm-switch disabled :text="['','']" color="bg-gradient-red-accent" v-model="jinyong"></tm-switch>
						</template>
					</tm-listitem>
				</tm-grouplist>
				<tm-grouplist black :margin="32" :shadow="24">
					<tm-listitem black title="黑暗主题">
						<template v-slot:rightIcon="">
							<tm-switch :text="['','']" color="bg-gradient-green-accent" v-model="on"></tm-switch>
						</template>
					</tm-listitem>
					<tm-listitem black title="点我触发事件">
						<template v-slot:rightIcon="">
							<tm-switch @change="change" name="顺心" :text="['','']" color="bg-gradient-amber-accent" v-model="on"></tm-switch>
						</template>
					</tm-listitem>
				</tm-grouplist>
				
				<view style="height: 50upx;"></view>
			</view>
		</template>
	</tm-fullView>
	

</template>

<script>
	import tmFullView from "@/tm-vuetify/components/tm-fullView/tm-fullView.vue"
	import tmMenubars from "@/tm-vuetify/components/tm-menubars/tm-menubars.vue"
	import tmSheet from "@/tm-vuetify/components/tm-sheet/tm-sheet.vue"
	import tmSwitch from "@/tm-vuetify/components/tm-switch/tm-switch.vue"
	import tmListitem from "@/tm-vuetify/components/tm-listitem/tm-listitem.vue"
	import tmGrouplist from "@/tm-vuetify/components/tm-grouplist/tm-grouplist.vue"
	export default {
		components:{tmFullView,tmMenubars,tmSheet,tmSwitch,tmListitem,tmGrouplist},
		data() {
			return {
				on:true,
				jinyong:false
			}
		},
		methods: {
			change(e){
				uni.$tm.toast(JSON.stringify(e))
			}
		}
	}
</script>

<style>

</style>
